<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="xm"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath() %>/css/base.css">
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath() %>/css/Message.css">
<script type="text/javascript">
		function addLeaveword()
		{ 
			
			var context = document.getElementById("context").value;	
			var title = document.getElementById("text").value;
			alert("是否确认提交您的留言");
			location.href='<%=request.getContextPath()%>/filter/leaveword?m=add&context='+context+'&title='+title;
		}
	</script>
</head>
<body>
	 <div id="box">
		 <jsp:include page="/comm/header.jsp"></jsp:include>
		 <div id="main">
		 	<img alt="" src="<%=request.getContextPath() %>/images/Car_icon_20.png">
			<div id="liuyan">
			
			<xm:forEach items="${leaveList }" var="leave">
				<div >
					<table>
						<tr class="bg_tr">
							<th class="dx">留言标题:<span class="da">${leave.title }</span></th>
							<th class="ds">顾客姓名:<span class="da">${leave.memberName }</span></th>
							<th class="ds">留言时间:<span class="da">${leave.leaveDate }</span></th>
						</tr>
						<tr ><td>${leave.context }</td></tr>
					</table>
				
				</div>
			</xm:forEach>
				
			</div>
			<div id="gukeliuyan">
				<img alt="" src="<%=request.getContextPath() %>/images/icon_liuyan.png">
				<div id="gukeliuyan1">
					<p>分享你的观点</p>
				</div>
			    
			
			</div>
			
			<div id="goliuyan">
				<table>
					<tr>
						<td class="ds">留言标题:</td>
						<td><input value="" type="text" id="text"></td>
					</tr>
					
					<tr>
						<td class="ds">留言内容:</td>
						<td>
							<textarea id="context">
							</textarea>
						</td>
					</tr>
					<tr>
						<td></td>
						<td><button class="buttongo" onclick="addLeaveword()">提交留言</button></td>
					</tr>
				</table>
			</div>
		 </div>
		 <jsp:include page="/comm/footer.jsp"></jsp:include>
	 </div>
</body>
</html>